package com.olek;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;


public class SwingConsole {
	public static void run(final JFrame f, final int width, final int height){
		SwingUtilities.invokeLater(new Runnable(){
			public void run(){
				Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
				f.setLocation((dim.width - width)/2, (dim.height - height)/2);
				f.setSize(width, height);
				f.setVisible(true);
			}
		});
	}
}